package com.diandian.backend.order.param;

import com.diandian.base.boot.starter.exception.DefaultException;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class OrderOnlineDouyinLifeAddSupplementParam implements Serializable {

	private List<OrderOnlineDouyinLifeAddSupplementParamData> orderList;
	private String belong;
	/**
	 * 补充的日期，格式：yyyy-MM-dd
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date time;

	public void check(){
		if(this.orderList == null || this.orderList.size() == 0 || this.orderList.size() > 50){
			throw new DefaultException("数据集合不能为空");
		}
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属不能为空");
		}
		if(this.time == null){
			throw new DefaultException("补充日期不能为空");
		}
	}

	public List<OrderOnlineDouyinLifeAddSupplementParamData> getOrderList() {
		return orderList;
	}

	public void setOrderList(List<OrderOnlineDouyinLifeAddSupplementParamData> orderList) {
		this.orderList = orderList;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}
}
